<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>单选框 radio v-model 双向绑定</title>
</head>
<body>
    <script src='/js/vue.js'></script>
    <div id='app'>
        <!-- input 标签 type是radio -->
        <!-- 当单选框备选重时，v-model绑定的数据属性的值被设置为单选框的valuezhi -->
        <!-- h5 添加了name属性形成互斥 -->

        <labe for="male">
            <input type="radio" id="male" value="男" name="sex">男
        </label>

        <labe for="female">
            <input type="radio" id="female" value="女" name="sex">女
        </label>
        <br>
        {{gender}}


    </div>

    <script>
        let app = new Vue({
            el:'#app',
            data:{
                gender:'女'//设置默认值
            },

        })
    </script>
    
</body>
</html>